﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SaleManagement.Model;

namespace SaleManagement.Services.Mapping
{
    public class PostDisplayMapping
    {
        public static ViewModelPostDisplay ConvertToDisplay(ViewModelPost model, ViewModelPostDetail modelDetail)
        {
            ViewModelPostDisplay modelDispaly = new ViewModelPostDisplay();
            
            modelDispaly.Detail = modelDetail.Detail;
            modelDispaly.Id = model.Id;
            modelDispaly.Image = model.Image;
            modelDispaly.Status = model.Status;
            modelDispaly.Subject = modelDetail.Subject;
            modelDispaly.Sumary = modelDetail.Sumary;
            modelDispaly.CreateDate = model.CreateDate;
            modelDispaly.UpdatedDate = model.UpdatedDate;
            return modelDispaly;
        }
    }
}
